#ifndef COLLADA_TYPE_H_
#define COLLADA_TYPE_H_


// Collada format
#define COLLADA_FORMAT_MASK			0x0000FFFF

#define COLLADA_X					0x00000001
#define COLLADA_Y					0x00000002
#define COLLADA_Z					0x00000003
#define COLLADA_W					0x00000004

#define COLLADA_R					0x00000008
#define COLLADA_G					0x00000009
#define COLLADA_B					0x0000000A
#define COLLADA_A					0x0000000B

#define COLLADA_XY					0x00000021
#define COLLADA_XZ					0x00000031
#define COLLADA_YX					0x00000012
#define COLLADA_YZ					0x00000032
#define COLLADA_ZX					0x00000031
#define COLLADA_ZY					0x00000032

#define COLLADA_XYZ					0x00000321
#define COLLADA_XZY					0x00000231
#define COLLADA_YXZ					0x00000312
#define COLLADA_YZX					0x00000132
#define COLLADA_ZXY					0x00000213
#define COLLADA_ZYX					0x00000321


// Collada type
#define COLLADA_TYPE_MASK			0xFFFF0000

#define COLLADA_TYPE_BOOL			0x01010000

#define COLLADA_TYPE_INT			0x02010000

#define COLLADA_TYPE_HALF			0x04010000

#define COLLADA_TYPE_FLOAT			0x08010000
#define COLLADA_TYPE_FLOAT1			0x08010000
#define COLLADA_TYPE_FLOAT2			0x08020000
#define COLLADA_TYPE_FLOAT3			0x08030000
#define COLLADA_TYPE_FLOAT3X3		0x08330000
#define COLLADA_TYPE_FLOAT4			0x08040000
#define COLLADA_TYPE_FLOAT4X4		0x08440000

#define COLLADA_TYPE_DOUBLE			0x10010000
#define COLLADA_TYPE_DOUBLE1		0x10010000
#define COLLADA_TYPE_DOUBLE2		0x10020000
#define COLLADA_TYPE_DOUBLE3		0x10030000
#define COLLADA_TYPE_DOUBLE4		0x10040000


// Collada semantic
#define COLLADA_SEMANTIC_MASK		0x0000FF00

#define COLLADA_SEMANTIC_POSITION	0x00000100

#define COLLADA_SEMANTIC_NORMAL		0x00000200
#define COLLADA_SEMANTIC_NORMAL0	0x00000200
#define COLLADA_SEMANTIC_NORMAL1	0x00000201

#define COLLADA_SEMANTIC_TEXCOORD	0x00000400
#define COLLADA_SEMANTIC_TEXCOORD0	0x00000400
#define COLLADA_SEMANTIC_TEXCOORD1	0x00000401


// Collada primitive type
#define COLLADA_PT_MASK				0x000000FF

#define COLLADA_PT_LINES			0x00000001
#define COLLADA_PT_LINESTRIPS		0x00000002
#define COLLADA_PT_POLYGONS			0x00000004
#define COLLADA_PT_POLYLIST			0x00000008
#define COLLADA_PT_TRIANGLES		0x00000010
#define COLLADA_PT_TRIFANS			0x00000020
#define COLLADA_PT_TRISTRIPS		0x00000040


namespace Collada
{
	
	typedef unsigned int				Format;
	typedef unsigned int				ID;
	typedef unsigned int				PrimitiveType;
	typedef unsigned int				Semantic;
	typedef unsigned int				Type;
	typedef unsigned int				TypeAndFormat;
	typedef unsigned int				VertexElement;

	typedef std::pair< Semantic, ID >	Accessor;

	struct PrimitiveInfo
	{
		std::string						typeStr;
		std::vector< Accessor >			accessorList;
		std::string						indexStream;
		int								indexCount;
	};

	struct Primitive
	{
		PrimitiveType					type;
		std::vector< VertexElement >	vertexElements;
		std::vector< void* >			buffers;
		void*							indices;
		int								indexCount;
	};

};

#endif